#include "bsp_voice.h"
#include "string.h"


u8 voicePoint;

u8 VoicePoint[][2][15] = 
{
  {"打开灯光","AA0132BB"},
	{"关闭灯光","AA0133BB "},
  {"打开空调","AA0125BB"},
	{"关闭空调","AA0126BB"},





};

//sf
void voiceDoEventRegistr()
{
	


}


void clearU2Rcv()
{
	u8 i;
	for(i=0;i<U2RCV_MAXLEN;i++)
	{
		u2RcvBuf[i] = 0;
	}
}

//返回0表示未知指令
//返回1开窗帘指令
u8 voiceCheke(u8 unu5,u8 unu6)
{
		u16 udat;
		u16 uilen;
		u8  ucont;

	uilen = sizeof(VoicePoint)/sizeof(VoicePoint[0]);
	
	for(ucont=0;ucont<uilen;ucont++)
	{
		if(unu5 == VoicePoint[ucont][1][4] && unu6 == VoicePoint[ucont][1][5]) 
		{
			udat=(unu5-'0')*10+(unu6-'0');
			
		}
	}
	if(u2RcvOverFlag)
	{
			clearU2Rcv();
	}
	return udat;

}

